<?php

// Takes an isbn number and returns all of the amazon price data
function bc_amazon_price_gen( $isbn ) {
	
	// Get Default Options
	$options = get_option('bc_options');
	extract($options);
	
	$params = array(
		"Operation" => "ItemSearch",
		"Keywords" => $isbn
		);
	
	$amazon_price = bc_amazon_price($region, $params, $public_key, $private_key, $associate_tag);
	
	return $amazon_price;
	
}

// Takes a keyword and returns all of the amazon price data
function bc_amazon_search_price_gen( $search ) {
	
	// Get Default Options
	$options = get_option('bc_options');
	extract($options);
	
	$params = array(
		"Operation" => "ItemSearch",
		"Keywords" => $search
		);
	
	$bc_amazon_search_price = bc_amazon_search_price($region, $params, $public_key, $private_key, $associate_tag);
	
	return $bc_amazon_search_price;
	
}

// Takes an isbn number and returns all of the amazon details data
function bc_amazon_details_gen( $isbn ) {
	
	// Get Default Options
	$options = get_option('bc_options');
	extract($options);
	
	$params = array(
		"Operation" => "ItemSearch",
		"Keywords" => $isbn
		);
	
	$amazon_details = bc_amazon_details($region, $params, $public_key, $private_key, $associate_tag);
	
	return $amazon_details;
	
}

// Takes an isbn number and returns all of the amazon image data
function bc_amazon_image_gen( $isbn ) {
	
	// Get Default Options
	$options = get_option('bc_options');
	extract($options);
	
	$params = array(
		"Operation" => "ItemSearch",
		"Keywords" => $isbn
		);
	
	$amazon_images = bc_amazon_images($region, $params, $public_key, $private_key, $associate_tag);
	
	return $amazon_images;
	
}

// Takes an isbn number and returns all of the amazon attribute data
function bc_amazon_attributes_gen( $isbn ) {
	
	// Get Default Options
	$options = get_option('bc_options');
	extract($options);
	
	$params = array(
		"Operation" => "ItemSearch",
		"Keywords" => $isbn
		);
	
	$UPC = bc_amazon_attributes($region, $params, $public_key, $private_key, $associate_tag);
	
	return $UPC;
	
}

?>